<template>
  <div id="expressInquiry">
    <load-more :tip="tip" v-if="!loading"></load-more>
    <div v-if="loading">
      <p style="line-height: 0.9rem; margin-top: 0.15rem; background: #fff; padding: 0rem 0.2rem;">
        <span>顺丰</span>
        <span></span>
      </p>
      <div style="background: #fff;">
        <p style="line-height: 0.9rem; margin: 0.15rem 0.2rem;" class="vux-1px-b">快递详情</p>
        <div class="flex timeline" v-for="item in [,,,,,,]">
          <div class="time">2018-09-09<br />19:00</div>
          <div class="quan"><i class="icon icon-quan"></i></div>
          <div class="info">多少多少都快死了都快死了都快死了卡德罗斯卡德罗斯卡德罗斯卡德罗斯卡德罗斯看</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import PubHeader from '../components/PubHeader.vue'

export default{
  components: {
    PubHeader
  },
  created() {
    this.$http.post($config.host + '/api/Expresspass/KdApiSearch', qs.stringify({
      uid: this.$store.state.userInfo.uid,
      client: $config.client_type,
      device: $config.device_type,
      token: this.$store.state.userInfo.token
    })).then(res => {
      const {code, data, msg} = res.data
      if(code == '1') {
        this.loading = true
      } else if (code == '3') {
        this.$vux.toast.text($config.loginErrMsg, 'middle')
        this.$router.push({path: '/logout'})
      } else {
        this.tip = msg
        this.$vux.toast.text(msg, 'middle')
      }
    }).catch(err => {
      this.tip = $config.errMsg
      this.$vux.toast.text($config.errMsg, 'middle')
    })
  },
  data() {
    return {
      tip: '查询中...',
      loading: true
    }
  }
}
</script>
<style scoped>
.timeline{
  margin-bottom: 0.3rem;
  padding: 0rem 0.2rem;
}
.time{
  width: 1.7rem;
  text-align: center;
  color: #adadad;
}
.quan{
  width: 1rem;
  text-align: center;
}
.quan .icon{
  font-size: 0.28rem;
  color: #adadad;
}
.info{
  flex:1;
  font-size: 0.28rem;
  color: #666666;
}
</style>
